package com.store.service;

import com.store.pojo.Product;
import org.springframework.ui.Model;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface ProductService {

List<Product> findAllProductInfo();

    String deleteByPId(int id, HttpServletResponse response) throws IOException;

    Map<String,Object> doUpdateproPic(MultipartFile file, HttpSession session);

    //统计记录数
    int getCountTotal();
    //分页
    List<Product> findProductByPage(Integer offSet,
                                 Integer pageSize);



    //根据id 查询当前商品信息
    //Product findProductByPid(Integer id);

    //添加商品
    int addProduct(Product product);

}
